package com.ruoyi.web.controller.datastatistics;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.datastatistics.service.IMainXbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
@RequestMapping("/datastatistics/mainXbIndex")
public class MainXbController {

    @Autowired
    private IMainXbService mainXbService;
    @GetMapping("/getMainHeadDataXb")
    public AjaxResult getMainHeadDataXb()
    {
        return success(mainXbService.getMainHeadDataDb());
    }

    @GetMapping("/getMainWarnDataXb")
    public AjaxResult getMainWarnDataXb()
    {
        return success(mainXbService.getMainWarnDataXb());
    }

    @GetMapping("/getMeterReadingRate")
    public AjaxResult getMeterReadingRate()
    {
        return success(mainXbService.getMeterReadingRate());
    }

    @GetMapping("/getGrowthRate")
    public AjaxResult getGrowthRate()
    {
        return success(mainXbService.getGrowthRate());
    }
}
